﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;

/// <summary>
/// Summary description for Logger
/// </summary>
public class Logger
{
    public static String BaseDirectory = AppDomain.CurrentDomain.BaseDirectory;
    private static String GeneralLogFile = HttpContext.Current.Server.MapPath("~/App_Data/GeneralLog.txt");

    public Logger()
    {

    }

    public static void LogToFile(string path, string dataToLog)
    {
        StreamWriter sw = new StreamWriter(path, true);
        sw.WriteLine(dataToLog);
        sw.Close();
    }
    public static void LogGeneral(string dataToLog)
    {
        File.WriteAllText(GeneralLogFile, dataToLog);
    }
}